package com.endbd.purchase.purchase_order.service;

import com.endbd.feignapi.model.purchase.CDetails;
import com.endbd.feignapi.model.purchase.CPurchase;
import com.endbd.purchase.purchase_order.model.PurchaseOrderCondition;
import org.apache.ibatis.annotations.Param;

import javax.websocket.server.PathParam;
import java.util.List;

/**
 * @Auther:Lang
 * @Date:2022-11-18
 * @Time:14:33
 * @Description:TODO
 */
public interface PDMLService {
    /**
     * 根据采购单的编号添加审核人
     *
     * @param purchaseId
     * @param uid
     * @return
     */
    int addAuditNameByPurchaseId(String purchaseId, Integer uid);


    /**
     * 采购单的审核
     *
     * @param conn 只需审核意见、审核状态、审核人的id
     * @return
     */
    int auditById(PurchaseOrderCondition conn);

    /**
     * 删除采购单
     *
     * @param purchaseId
     * @return
     */
    int delByPurchaseId(String purchaseId);

    /**
     * 添加采购单
     *
     * @return
     */
    int addPurchaseOrder(CPurchase purchase);

    /**
     * 添加采购明细
     *
     * @param details
     * @return
     */
    int addPurchaseDetail(List<CDetails> details);

    /**
     * 根据采购单id删除采购单明细
     *
     * @param purchaseId
     * @return
     */
    int delDetailByPurchaseIdAndProductId(String purchaseId);

    int updateWarehouseIdAndRkStatus(PurchaseOrderCondition opc);
}
